<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>订单详情</title>
<link href="<{$ipath}>user/style/my_service_css.css" type="text/css" rel="stylesheet">
<link href="<{$ipath}>app/hotel/style/order_css.css" type="text/css" rel="stylesheet">
<link href="<{$ipath}>app/hotel/style/room_css.css" type="text/css" rel="stylesheet">
<script src="<{$ipath}>public/js/jquery.js"></script>
<script>
$(document).ready(function(e) {
	$("#add_lianxi").hide();
});
</script>
</head>

<body>
<div class="servicebox">
    <!--内容-->
    <P class="caption">当前位置 | 酒店管理 > 订单详情</P>
    <!--订单信息-->
    <div class="content01">
    	<div class="caibox">
        <p class="title p_01">订单信息</p>
        <!--内容94%-->
        <div class="order_box">
        	<!--订单编号-->
            <!--上图部分-->
            <div class="ul_box">
            <ul class="border_ul">
            	<li class="li_01">
                	<div class="order_libox">
                        <div class="order_li_left">
                            <img src="<{$ipath}>app/hotel/images/order_01.png">
                            <span class="zi_green">订单提交</span>
                        </div>
                        <img src="<{$ipath}>app/hotel/images/order_05.png" class="round">
                    </div>
                </li>
                <li class="li_01 li_back">
                	<div class="order_libox">
                        <div class="order_li_left">
                            <img src="<{$ipath}>app/hotel/images/order_02.png">
                            <span class="zi_green">酒店确认</span>
                        </div>
                        <img src="<{$ipath}>app/hotel/images/order_05.png" class="round">
                        <!--<span class="resent">重发确认信息</span>-->
                        
                    </div>
                </li>
                <li class="li_01">
                	<div class="order_libox">
                        <div class="order_li_left">
                            <img src="<{$ipath}>app/hotel/images/order_<{if $res.status==2 || $res.status==7}>03<{else}>003<{/if}>.png">
                            <span class="zi_<{if $res.status==2 || $res.status==7}>green<{else}>grey<{/if}>">已入住</span>
                        </div>
                        <img src="<{$ipath}>app/hotel/images/order_0<{if $res.status==2 || $res.status==7}>5<{else}>6<{/if}>.png" class="round">
                    </div>
                </li>
                <li class="li_01">
                        <div class="order_li_left">
                            <img src="<{$ipath}>app/hotel/images/order_<{if $res.status==7}>04<{else}>004<{/if}>.png">
                            <span class="zi_<{if $res.status==7}>green<{else}>grey<{/if}>">成交</span>
                        </div>
                </li>
            </ul>
            <!--<img src="images/order_sanjiao.png" class="sanjiao">-->
            </div>
            <!--长方形信息-->
            <!--<div class="triangle_box">
            	<div class="triangle">
                	<div class="triangle_top">

                        <div class="triangle_nei">
                            <span><img src="<{$ipath}>app/hotel/images/order_07.png"></span>
                            <span class="span_triangle">
                                <span>2015-11-21 周五 09:09</span>
                                酒店已确认，您的房间预订成功
                            </span>
                        </div>

                        <div class="triangle_nei">
                            <span><img src="<{$ipath}>app/hotel/images/order_08.png"></span>
                            <span class="span_triangle">
                                <span class="time_left"> 09:09</span>
                                您的订单已经通知酒店，请等待酒店确认，预计2015-01-03  08:08 前短信通知您处理结果
                            </span>
                        </div>

                        <div class="triangle_nei">
                            <span><img src="<{$ipath}>app/hotel/images/order_08.png"></span>
                            <span class="span_triangle">
                                <span>2015-11-21 周三 09:09</span>
                                订单已提交，正在审核中
                            </span>
                        </div>
                    </div>
                </div>
                <img src="images/order_sanjiao.png" class="sanjiao">
            </div>-->
        	<p>
            	<span class="order_span01">订单编号</span>
                <span><{$res.order_sn}></span>
               <!-- <input type="button" value="打印订单" class="tijiao"> -->
            </p>
            <!--预订方式-->
        	<p>
            	<span class="order_span01">预订方式</span>
                <span>
                    <{if $res.status==1 && $res.source==1}>
                        预订
                    <{elseif $res.status==1 && $res.source==2}>
                        现付
                    <{elseif $res.status==2 && $res.source==2}>
                        现付
                    <{elseif $res.status==2 && $res.source==1 && $p_pay_type==1}>
                        预订
                    <{elseif $res.status==2 && $res.source==1 && $p_pay_type==2}>
                        预付
                    <{elseif $res.status==3 && $res.source==1 && $p_pay_type==1}>
                        预订
                    <{elseif $res.status==3 && $res.source==1 && $p_pay_type==2}>
                        预付
                    <{elseif $res.status==3 && $res.source==2}>
                        现付
                    <{elseif $res.status==4 || $res.status==5}>
                        预付
                    <{elseif $res.status==6 && $res.source==1 && $p_pay_type==2}>
                        预付
                    <{elseif $res.status==6 && $res.source==1 && $p_pay_type==1}>
                        预订
                    <{elseif $res.status==6 && $res.source==2}>
                        现付
                    <{elseif $res.status==7 && $res.source==1 && $p_pay_type==2}>
                        预付
                    <{elseif $res.status==7 && $res.source==1 && $p_pay_type==1}>
                        预订
                    <{elseif $res.status==7 && $res.source==2}>
                        现付
                    <{/if}>
                </span>
                <{if $res.status == '1' || $res.status == '4'}>
                <input type="button" value="取消订单" class="tijiao" onclick="cancelorder(<{$res.id}>)"/>
                <{/if}>
            </p>
            <!--预定日期-->
        	<p>
            	<span class="order_span01">预定日期</span>
                <span><{$res.in_time}></span>
            </p>
            <!--支付情况-->
        	<p>
            	<span class="order_span01">支付情况</span>
                <span>
                    <{if $res.source==2 || ($res.source==1 && $p_pay_type==1)}>到店支付<{elseif $res.source==1 && $p_pay_type==2 && $res.status==4}>待支付<{elseif $res.source==1 && $p_pay_type==2 && ($res.status==5 || $res.status==6 || $res.status==2 || $res.status==7 || $res.status==3)}>已支付<{/if}>
                </span>
            </p>
            <!--总金额-->
        	<p>
            	<span class="order_span01">总金额</span>
                <span>￥<span class="orange"><{$res.amount}></span></span>
            </p>
            <p>
                <span class="order_span01">押金</span>
                ￥<input type="text" value="<{$res.cash}>" readonly id="cash"><!--<input type="button" onclick="setcash(<{$res.id}>)" value="保存"/>-->
            </p>
        </div>
       </div>
   </div>
   <!--入住信息-->
   <div class="content01 order">
   		<div class="caibox">
        <p class="title p_01">入住信息</p>
        <!--内容94%-->
        <div class="order_box">
        	<p class="hotel_title"><{$hinfo.name}>
            	<!--<span>
                	<img src="<{$ipath}>app/hotel/images/order_10.png"><img src="<{$ipath}>app/hotel/images/order_10.png"><img src="<{$ipath}>app/hotel/images/order_10.png"><img src="<{$ipath}>app/hotel/images/order_11.png"><img src="<{$ipath}>app/hotel/images/order_11.png">
                </span>-->
            </p>
            <p>
            	<span class="order_span01">酒店地址</span>
                <span><{$hinfo.address}></span><span class="order_span_img"><img src="<{$ipath}>app/hotel/images/order_12.png"></span>
            </p>
            <p>
            	<span class="order_span01">酒店房型</span>
                <span><{$roomtypestr}></span>
            </p>
            <!--入离时间-->
            <p>
            	<span class="order_span01">入离时间</span>
                <span class="order_span02">
                	<span class="qi"><{$res.in_time}>（星期<{date('N',strtotime($res.in_time))}>）</span>至
                    <span><{$res.out_time}>（星期<{date('N',strtotime($res.out_time))}>）</span>
                    <span class="shi">共<span class="orange"> <{$daynum-1}> </span>晚</span>
                </span>
            </p>
            <!--入住件间数-->
            <p>
            	<span class="order_span01">入住间数</span>
                <span><{$roomnum}></span>间
            </p>
            <!--房费/早餐-->
            <p>
            	<span class="order_span01">房费/早餐</span>￥
                <span class="orange"><{$res.amount}></span>
            </p>
            <!--住房信息-->
            <p>
            	<span class="order_span01">住房信息</span>
                <span><{$per_info}></span>
            </p>
            <!--到店时间-->
            <p>
            	<span class="order_span01">到店时间</span>
                <span><{$res.in_time}></span>
            </p>
        </div>
        </div>
   </div>
   <!--联系信息-->
   <div class="content01 order">
   		<div class="caibox">
        <p class="title p_01">联系信息</p>
        <!--内容94%-->
        <div class="order_box">
        <form>
            <p>
            	<span class="order_span01">联系手机</span>
                <span><{$res.create_phone}></span>
                <!--<input type="submit" value="提交" class="tijiao">-->
            </p>
        </form>
        </div>
        </div>
   </div>
   <!--酒店信息-->
   <div class="content01 order">
   		<div class="caibox">
        <p class="title p_01">酒店简介</p>
        <!--内容94%-->
        <div class="order_box hotel_infor">
            <span class="order_right" style="color: #b2b2b2;"><{$hinfo.intro1}></span>
        </div>
        </div>
   </div>
</div>
<script>
    function cancelorder(id){
        var url = '?m=order&a=cancelOrder&id='+id;
        $.get(url,function(data){
            if(data.stat==1){
                alert(data.msg);
                window.location.reload();
            }else{
                alert(data.msg);return;
            }
        },'json');
    }

    function setcash(order_id){
        var url = '?m=order&a=setcash';
        var data = {
            'order_id':order_id,
            'cash':$('#cash').val()
        };
        $.post(url,data,function(data){
            if(data.stat==1){
                alert(data.msg);
                window.location.reload();
            }else{
                alert(data.msg);return;
            }
        },'json');
    }
</script>
</body>
</html>
